import request from "@/utils/request";

// 获取频道信息
export const getChannelsApi = () => request.get('/channels')
// 获取文章列表
export const getArticlesApi = params => request.get('mp/articles', { params })
// 删除文章
export const delArticlesApi = id => request.delete('mp/articles/' + id)
// 发布文章
export const addArticleApi = params => request.post('mp/articles?draft=false', params)
// 编辑文章
export const editArticleApi = (params, draft) => request.put(`mp/articles/${params.id}?draft=${draft}`, params)
// 获取文章
export const getArticleApi = id => request.get('mp/articles/' + id)